﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewSunjectManagerEdit.aspx.cs" Inherits="ExamV5.StudyInfo.NewSunjectManagerEdit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>编辑教材</title>
    <link href="../layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link href="../Image/examstyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server" class="layui-form">
        <div class="tankuang">
            <div class="tanchuang_jc">
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="xing">*</span>所属类别</label>
                    <div class="layui-input-inline w280">
                        <asp:DropDownList ID="DDLType" runat="server">
                        </asp:DropDownList>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="xing">*</span>教材名称</label>
                    <div class="layui-input-inline w280">
                        <asp:TextBox ID="txtBookName" runat="server" CssClass="layui-input radius5"></asp:TextBox>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">编制单位</label>
                    <div class="layui-input-inline w280">
                        <asp:TextBox ID="txtUnitName" runat="server" CssClass="layui-input radius5"></asp:TextBox>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">编著作者</label>
                    <div class="layui-input-inline w280">
                        <asp:TextBox ID="txtMainUser" runat="server" CssClass="layui-input radius5"></asp:TextBox>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">编制日期</label>
                    <div class="layui-input-inline w280">
                        <asp:TextBox ID="txtInputTime" runat="server" CssClass="layui-input radius5"></asp:TextBox>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="xing">*</span>累计学分</label>
                    <div class="layui-input-inline w280">
                        <asp:TextBox ID="txtFen" runat="server" CssClass="layui-input radius5"
                            MaxLength="5"
                            onKeypress="javascript:if ((event.keyCode < 48 || event.keyCode > 57) && event.keyCode!=13 && event.keyCode!=46) event.returnValue = false;"
                            onpaste="return false">0</asp:TextBox>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="xing">*</span>扣除学分</label>
                    <div class="layui-input-inline w280">
                        <asp:TextBox ID="txtMemberFen" runat="server" CssClass="layui-input radius5"
                            MaxLength="5"
                            onKeypress="javascript:if (event.keyCode &lt; 48 || event.keyCode &gt; 57) event.returnValue = false;"
                            onpaste="return false">0</asp:TextBox>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="xing">*</span>排列序号</label>
                    <div class="layui-input-inline w280">
                        <asp:TextBox ID="txtSortInfo" runat="server" CssClass="layui-input radius5"
                            MaxLength="5"
                            onKeypress="javascript:if (event.keyCode &lt; 48 || event.keyCode &gt; 57) event.returnValue = false;"
                            onpaste="return false">1</asp:TextBox>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">上传封面</label>
                    <div class="layui-input-inline w360 photoup">
                        <div class="photo_box">
                            <asp:Image ID="ImgBook" runat="server" ImageUrl="../PublicFile/BookHome.jpg" />
                        </div>
                        <button type="button" class="layui-input radius5 bg_orange w100 white" id="files_upload" onclick="$('#UPUserData').click()">上传图片</button>
                        <input text="上传图片" id="UPUserData" type="file" name="UPUserData" runat="server" hidden="hidden" />
                        <b>建议尺寸大小为：90*110</b>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-block">
                        <asp:Button ID="butDefault" runat="server" Text="提  交" CssClass="layui-btn radius5 bg_blue w120" OnClientClick="return CheckData();" OnClick="butDefault_Click" />
                        <%--<asp:Button ID="butClose" runat="server" Text="关  闭" CssClass="layui-btn radius5 bg_c8c8c8 w120" OnClientClick="javascript:layer.closeAll();" />--%>
                        <input type="button" class="layui-btn radius5 bg_c8c8c8 w120" value="关闭" />
                    </div>
                </div>
            </div>
        </div>
    </form>
    <script type="text/javascript" src="../Image/jquery.min.js"></script>
    <script src="../layui/layui.all.js"></script>
    <script>
        layui.use('form', function () {
            var form = layui.form;
            form.render();
        });

        function CheckData() {

            if (document.getElementById("DDLType").value == "0") {
                alert("类别名称不可以为空！");
                document.getElementById("DDLType").focus();
                return false;
            }

            if (document.getElementById("txtBookName").value == "") {
                alert("教材名称不可以为空！");
                document.getElementById("txtBookName").focus();
                return false;
            }
            if (document.getElementById("txtFen").value == "") {
                alert("累计学分不可以为空！");
                document.getElementById("txtFen").focus();
                return false;
            }
            if (document.getElementById("txtMemberFen").value == "") {
                alert("扣除积分不可以为空！");
                document.getElementById("txtMemberFen").focus();
                return false;
            }
            if (document.getElementById("txtSortInfo").value == "") {
                alert("教材排序不可以为空！");
                document.getElementById("txtSortInfo").focus();
                return false;
            }

            return true;
        }

    </script>
</body>
</html>
